{% extends "users/settings/base.html" %}

{% block title %}
	昵称修改
{% endblock %}

{% block edit %}
	<div class="row">
		<div class="col-sm-8 settings-content">
			<form class="form-horizontal" role="form" action="{% url 'users:username' request.user.id %}" method="post">
				<!--防止恶意攻击-->
				{% csrf_token %}
				<!--用户名-->
		    <div class="form-group">
		      <label class="col-sm-2 control-label">昵称：</label>
          {% if username_error %}
            <div class="col-sm-10 has-error">
              <input type="text" class="form-control" name="username" value="{{ username }}"/>
              <p class="text-danger small">*{{ username_error }}</p>
            </div>
          {% else %}
            <div class="col-sm-10">
              <input type="text" class="form-control" name="username" value="{{ user.username }}"/>
            </div>
          {% endif %}
		    </div>
				<hr/>
				<button type="submit" class="btn btn-primary pull-right visible-sm visible-md visible-lg">保存</button>
        <button type="submit" class="btn btn-primary btn-block visible-xs">保存</button>
			</form>
		</div>
	</div>
{% endblock %}